package com.dyzx.hbb.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestClient;

@Configuration
public class OpenAiConfig {
/*
    @Value("${spring.ai.openai.api-key}")
    private String apiKey;
    @Value("${spring.ai.openai.base-url}")
    private String baseUrl;
    @Bean
    public RestClient restClient() {
        return RestClient.builder().build();
    }

    @Bean
    public OpenAiChatModel openAiChatModel(OpenAiApi openAiApi) {
        OpenAiChatOptions options = OpenAiChatOptions.builder()
                .model("GLM-4.5-Flash")
                .temperature(0.7)
                .build();
        return new OpenAiChatModel(openAiApi, options);
    }

    @Bean
    public OpenAiApi openAiApi( ) {
        OpenAiApi.Builder builder = OpenAiApi.builder();
        builder.baseUrl(baseUrl);
        builder.apiKey(apiKey);
        builder.completionsPath("v4/chat/completions");
        return builder.build();
    }*/
}
